package com.fotkidemo.util;

import android.app.Application;

/**
 * Created with IntelliJ IDEA.
 * User: roma
 * Date: 6/27/12
 * Time: 6:11 PM
 * To change this template use File | Settings | File Templates.
 */
public class CachesManagerApplication extends Application {
    /**
     * Инициализация сингелтонов-кэшей.
     * В соответствии с (http://www.devahead.com/blog/2011/06/extending-the-android-application-class-and-dealing-with-singleton/)
     */
    @Override
    public void onCreate() {
        super.onCreate();
        BitmapCache.initInstance();
        EntryCaches.initInstance();
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
        EntryCaches.getInstance().clearCaches();
    }
}
